import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            component: () => import('@/view/layout/index.vue'),
            children: [
                { path: '', component: () => import('@/view/home/index.vue') },
                { path: '/category/:id', component: () => import('@/view/category/index.vue') },
                { path: '/category/sub/:id', component: () => import('@/view/category/sub.vue') },
            ]
        },
        {
            path: '/login',
            component: () => import('@/view/login/index.vue')
        }
    ]
})

export default router